const chalk = require('chalk');

const message = {
  clone: '克隆代码',
  tag: '切换标签',
  install: '安装依赖',
  cmd: '执行脚本'
};

function info(type, status) {
  return chalk[status ? 'green' : 'red'](`${message[type]} ${status ? 'OK' : 'NO'}`) + ',';
}

exports.clone = function (status) {
  return info('clone', status);
}

exports.tag = function (status) {
  return info('tag', status);
}

exports.install = function (status) {
  return info('install', status);
}

exports.cmd = function (status) {
  return info('cmd', status);
}